package dice.sinanya.tools.getinfo;

import com.forte.qqrobot.beans.messages.result.inner.GroupMember;
import com.forte.qqrobot.sender.MsgSender;

import java.util.ArrayList;

public class GetAdminList {
    public static ArrayList<String> getAdminList(MsgSender msgSender, String groupId) {
        ArrayList<String> admins = new ArrayList<>();
        GroupMember[] groupMembers = msgSender.GETTER.getGroupMemberList(groupId).getList();
        for (GroupMember groupMember : groupMembers) {
            if (groupMember.getPower().TYPE >= 0) {
                admins.add(groupMember.getQQ());
            }
        }
        return admins;
    }
}
